import React, { Component } from 'react'

export default class User extends Component {
  render() {
    let {info, changeAge, changeName} = this.props;
    return (
      <div>
        <p>我是用户模块，我是UI型组件</p>
        <p>用户名：{info.name}</p>
        <p>年龄：{info.age}</p>
        <button onClick={()=>changeName('Jack')}>修改名字</button>
        <button onClick={()=>changeAge(100)}>修改年龄</button>
      </div>
    )
  }
}
